package com.engine.salary.service;

import com.engine.salary.entity.datacollection.dto.VariableArchiveListDTO;
import com.engine.salary.entity.datacollection.dto.VariableItemListDTO;
import com.engine.salary.entity.datacollection.param.VariableArchiveImportHandleParam;
import com.engine.salary.entity.datacollection.param.VariableArchiveQueryParam;
import com.engine.salary.entity.datacollection.param.VariableArchiveSaveParam;
import com.engine.salary.util.excel.ExcelPreviewDTO;
import com.engine.salary.util.page.PageInfo;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.time.YearMonth;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * 数据采集-浮动薪酬
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author xzy
 * @version 1.0
 **/
public interface VariableArchiveService {

    /**
     * 查询浮动薪酬档案（分页）
     *
     * @param queryParam
     * @return
     */
    PageInfo<VariableArchiveListDTO> listPage(VariableArchiveQueryParam queryParam);
    
    List<VariableArchiveListDTO> list(VariableArchiveQueryParam queryParam);

    /**
     * 构建浮动薪资档案数据
     *
     * @param variableArchives
     * @return
     */
    List<Map<String, Object>> buildVariableArchiveData(List<VariableArchiveListDTO> variableArchives);

    /**
     * 创建浮动薪酬档案
     *
     * @param saveParam
     */
    void createData(VariableArchiveSaveParam saveParam);

    /**
     * 浮动薪资档案明细
     *
     * @param queryParam
     * @return
     */
    Map<String, Object> getDetail(VariableArchiveQueryParam queryParam);

    List<VariableItemListDTO> getCreateForm();

    XSSFWorkbook downloadTemplate(VariableArchiveQueryParam param);

    ExcelPreviewDTO preview(VariableArchiveImportHandleParam importParam);

    Map<String, Object> importData(VariableArchiveImportHandleParam importParam);

    XSSFWorkbook export(VariableArchiveQueryParam param);

    void deleteSelectVariableArchive(Collection<Long> deleteIds);

    List<Map<String, Object>> listBySalaryMonthAndEmployeeIds(YearMonth salaryMonth, List<Long> employeeIds, List<Long> taxAgentIds);

    void updateData(VariableArchiveSaveParam updateParam);
}
